package com.blast.sspai.adapter;

import android.content.Intent;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.View;
import android.view.ViewGroup;

import java.util.List;

/**
 * Created by dell on 2015/6/17.
 */
public class AdvertPagerAdapter extends FragmentPagerAdapter{
    private List<Fragment> fragments;

    public AdvertPagerAdapter(FragmentManager manager,List<Fragment> fragments) {
        super(manager);
        this.fragments = fragments;
    }





    @Override
    public int getCount() {
        int ret = 0;
        if (fragments!=null){
            ret = fragments.size();
        }
        return ret;
    }

    @Override
    public Fragment getItem(int position) {
        Fragment ret = null;
        if (fragments!=null){
            ret = fragments.get(position);
        }
        return ret;
    }
}
